﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ManhattanControl.model
{
    public class WuLiaoIceSel
    {
        private static WuLiaoIceSel instance;
        private WuLiaoIceSel() { }
        public static WuLiaoIceSel Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new WuLiaoIceSel();
                }
                return instance;
            }
        }
        /// <summary>
        /// 冰淇淋冻杠
        /// </summary>
        public bool IsIceDongGang { get; set; } = false;
        /// <summary>
        /// 冰淇淋物料
        /// </summary>
        public bool IsICeMaterial1 { get; set; } = false;
        /// <summary>
        /// 冰淇淋物料2
        /// </summary>
        public bool IsICeMaterial2 { get; set; } = false;
        /// <summary>
        /// 安全光栅
        /// </summary>
        public bool BANNER_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 取杯成功检测
        /// </summary>
        public bool TakeCup_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 取杯成功检测2
        /// </summary>
        public bool TakeCup2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 落杯器检测
        /// </summary>
        public bool CupLBQ_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 出餐杯子检测
        /// </summary>
        public bool OutMealCup_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 推杆上限检测
        /// </summary>
        public bool PushRodUP_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 推杆下限检测
        /// </summary>
        public bool PushRodDown_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 杯子1 吧供料检测
        /// </summary>
        public bool CupFeed1_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 杯子2供料检测
        /// </summary>
        public bool CupFeed2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖1
        /// </summary>
        public bool GT1_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖2
        /// </summary>
        public bool GT2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖2
        /// </summary>
        public bool GT3_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 落杯器反馈1
        /// </summary>
        public bool LBQFK1_Bol { get; set; } = false;
        /// <summary>
        /// 落杯器反馈2
        /// </summary>
        public bool LBQFK2_Bol { get; set; } = false;
        /// <summary>
        /// 果碎1物料检测
        /// </summary>
        public bool GSWL1_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果碎2物料检测
        /// </summary>
        public bool GSWL2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖1
        /// </summary>
        public double SugarInit1 { get; set; } = 3;
        /// <summary>
        /// 果糖2
        /// </summary>
        public double SugarInit2 { get; set; } = 3;
        /// <summary>
        /// 果糖3
        /// </summary>
        public double SugarInit3 { get; set; } = 3;
        /// <summary>
        /// 果碎1
        /// </summary>
        public double GSInit1 { get; set; } = 3;
        /// <summary>
        /// 果碎2
        /// </summary>
        public double GSInit2 { get; set; } = 3;
        /// <summary>
        /// 冰沙
        /// </summary>
        public double BSInit1 { get; set; } = 1;
        /// <summary>
        /// 冰淇淋故障
        /// </summary>
        public bool IceWarn { get; set; } = false;
        /// <summary>
        /// 机器人运行
        /// </summary>
        public bool RobotWarn { get; set; } = false;
        public bool IsWLBol { get; set; } = false;
        public int IceIint1 { get; set; } = 1;
        public int IceIint2 { get; set; } = 1;
        public int IceIint3 { get; set; } = 1;
    }
    public class WuLiaoCoffeeSel
    {
        private static WuLiaoCoffeeSel instance;
        private WuLiaoCoffeeSel() { }
        public static WuLiaoCoffeeSel Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new WuLiaoCoffeeSel();
                }
                return instance;
            }
        }
        /// <summary>
        /// 安全光栅
        /// </summary>
        public bool BANNER_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 取杯成功检测
        /// </summary>
        public bool TakeCup_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 落杯器检测
        /// </summary>
        public bool CupLBQ_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 出餐杯子检测
        /// </summary>
        public bool OutMealCup_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 推杆上限检测
        /// </summary>
        public bool PushRodUP_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 推杆下限检测
        /// </summary>
        public bool PushRodDown_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 杯子1 吧供料检测
        /// </summary>
        public bool CupFeed1_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 杯子2供料检测
        /// </summary>
        public bool CupFeed2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 咖啡豆检测1
        /// </summary>
        public bool CoffeeBean_Sel_Bol { get; set; } = true;
        /// <summary>
        /// 咖啡豆检测2
        /// </summary>
        public bool CoffeeBean2_Sel_Bol { get; set; } = true;
        /// <summary>
        /// 冰品杯1
        /// </summary>
        public bool IceCup1_Bol { get; set; } = false;
        /// <summary>
        /// 冰品杯2
        /// </summary>
        public bool IceCup2_Bol { get; set; } = false;
        /// <summary>
        /// 牛奶检测
        /// </summary>
        public bool Milk_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 冰正常
        /// </summary>
        public bool Ice_Bol { get; set; } = true;
        /// <summary>
        /// 打印正常
        /// </summary>
        public bool Print_Bol { get; set; } = true;
        /// <summary>
        /// 水检测咖啡机
        /// </summary>
        public bool Water_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 水检测制冰机
        /// </summary>
        public bool Water2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 水检测拉花洗缸
        /// </summary>
        public bool Water3_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖1
        /// </summary>
        public bool GT1_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖2
        /// </summary>
        public bool GT2_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 果糖3
        /// </summary>
        public bool GT3_Sel_Bol { get; set; } = false;
        ///// <summary>
        ///// 汤茶1
        ///// </summary>
        //public bool TC1_Sel_Bol { get; set; } = false;
        ///// <summary>
        ///// 汤茶2
        ///// </summary>
        //public bool TC2_Sel_Bol { get; set; } = false;
        ///// <summary>
        ///// 汤茶3
        ///// </summary>
        //public bool TC3_Sel_Bol { get; set; } = false;
        ///// <summary>
        ///// 汤茶4
        ///// </summary>
        //public bool TC4_Sel_Bol { get; set; } = false;
        /// <summary>
        /// 落杯器反馈1
        /// </summary>
        public bool LBQFK1_Bol { get; set; } = false;
        /// <summary>
        /// 落杯器反馈2
        /// </summary>
        public bool LBQFK2_Bol { get; set; } = false;
        /// <summary>
        /// 果糖1
        /// </summary>
        public double SugarInit1 { get; set; } = 3;
        /// <summary>
        /// 果糖2
        /// </summary>
        public double SugarInit2 { get; set; } = 3;
        /// <summary>
        /// 果糖3
        /// </summary>
        public double SugarInit3 { get; set; } = 3;
        /// <summary>
        /// 咖啡故障
        /// </summary>
        public bool CoffeeWarn { get; set; } = false;
        /// <summary>
        /// 机器人运行
        /// </summary>
        public bool RobotWarn { get; set; } = false;
        /// <summary>
        /// 物料变化
        /// </summary>
        public bool IsWLBol { get; set; } = false;

    }
    public class MessageClientList
    {
        private static MessageClientList instance;
        private MessageClientList() { }
        public static MessageClientList Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new MessageClientList();
                }
                return instance;
            }
        }
        /// <summary>
        /// 触发事件名   /// Reload_L  Reload_R Reload_I
        /// </summary>
        public string Name { get; set; } = "";
        /// <summary>
        /// 状态  0 关状态  1 开状态 2 已开机 3 上电 4 下电 5 已使能 6 下使能 7 已运行 8 继续运行 9 已报警 10 已暂停  11已停止 ,12 机械臂状态查询
        /// </summary>
        public double type { get; set; } = 0;
    }
    public class RobotMsg
    {
        private static RobotMsg instance;
        private RobotMsg() { }
        public static RobotMsg Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new RobotMsg();
                }
                return instance;
            }
        }
        /// <summary>
        /// 已开机
        /// </summary>
        public bool Robot_YKJ { get; set; } = false;
        /// <summary>
        /// 已上电
        /// </summary>
        public bool Robot_SD { get; set; } = false;
        /// <summary>
        /// 已使能
        /// </summary>
        public bool Robot_SN { get; set; } = false;
        /// <summary>
        /// 已运行
        /// </summary>
        public bool Robot_YX { get; set; } = false;
        /// <summary>
        /// 已暂停
        /// </summary>
        public bool Robot_ZT { get; set; } = false;
        /// <summary>
        /// 已报警
        /// </summary>
        public bool Robot_BJ { get; set; } = false;
        /// <summary>
        /// 已停止
        /// </summary>
        public bool Robot_TZ { get; set; } = false;
        ///// <summary>
        ///// 已开机
        ///// </summary>
        //public bool Robot_YKJ_R { get; set; } = false;
        ///// <summary>
        ///// 已上电
        ///// </summary>
        //public bool Robot_SD_R { get; set; } = false;
        ///// <summary>
        ///// 已使能
        ///// </summary>
        //public bool Robot_SN_R { get; set; } = false;
        ///// <summary>
        ///// 已运行
        ///// </summary>
        //public bool Robot_YX_R { get; set; } = false;
        ///// <summary>
        ///// 已暂停
        ///// </summary>
        //public bool Robot_ZT_R { get; set; } = false;
        ///// <summary>
        ///// 已报警
        ///// </summary>
        //public bool Robot_BJ_R { get; set; } = false;
        ///// <summary>
        ///// 已停止
        ///// </summary>
        //public bool Robot_TZ_R { get; set; } = false;
        //  /// <summary>
        ///// 已开机
        ///// </summary>
        //public bool Robot_YKJ_I { get; set; } = false;
        ///// <summary>
        ///// 已上电
        ///// </summary>
        //public bool Robot_SD_I { get; set; } = false;
        ///// <summary>
        ///// 已使能
        ///// </summary>
        //public bool Robot_SN_I { get; set; } = false;
        ///// <summary>
        ///// 已运行
        ///// </summary>
        //public bool Robot_YX_I { get; set; } = false;
        ///// <summary>
        ///// 已暂停
        ///// </summary>
        //public bool Robot_ZT_I { get; set; } = false;
        ///// <summary>
        ///// 已报警
        ///// </summary>
        //public bool Robot_BJ_I { get; set; } = false;
        ///// <summary>
        ///// 已停止
        ///// </summary>
        //public bool Robot_TZ_I { get; set; } = false;
    }
    public class ClientList
    {
        public MessageClientList message { get; set; } = MessageClientList.Instance;
        public WuLiaoCoffeeSel MsgBol { get; set; } = WuLiaoCoffeeSel.Instance;
        public WuLiaoIceSel MsgIceBol { get; set; } = WuLiaoIceSel.Instance;
        public RobotMsg robotMsg { get; set; }
        /// <summary>
        /// 状态 0 单状态  1 冰淇淋状态  2 咖啡状态 ,3 机器人状态 ，4 咖啡机，5 冰淇淋 6咖啡制作，7冰淇淋制作 8奶茶制作 9泡茶制作,10 大屏状态,11.连接大屏  99 连接状态
        /// </summary>
        public int code { get; set; } = 0;
        /// <summary>
        /// 机器是否在制作中
        /// </summary>
        public bool IsMake { get; set; } = false;
    }
}
